package com.hnevc.mediaplayerdemo;

import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.MediaController;
import android.widget.VideoView;

public class VideoPlayActivity extends AppCompatActivity {
    VideoView mVideoView;
    MediaController mController;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_video_play);
        mVideoView = (VideoView) findViewById(R.id.id_vv_video);
        mVideoView.setVideoURI(Uri.parse("http://"
                +getResources().getString(R.string.server_id)
                +":8080/RestaurantServer/uploadFoodImage/mingyue.flv"));
        mController = new MediaController(this);
        mVideoView.setMediaController(mController);
        mVideoView.start();
    }

    public  void play(View v) {

    }

}
